<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<html>
<f:view>
	<head>
	<title>Volunteer confirmation</title>
	<style type="text/css">
	  .orders {
	     border: 2px solid black; 
	  }
	  .ordersHeader {
	     text-align: center;
	     font-style: italic;
	     color: Snow;
	     background: Teal;
	  }
	  .oddRow {
	     height: 25px;
	     text-align: left;
	     background: MediumTurquoise;
	  }
	  .evenRow {
	     text-align: left;
	     background: PowderBlue;
	  }
  </style>
	</head>

	<body>
	<h1>

		<h:outputText value="Volunteer Confirmation" />

	</h1>
	
 	<h:messages errorStyle="color: #ff0000" globalOnly="true"/>


	<h:form id="confirmForm">
		<hr />
		<h:panelGrid columns="6">
			<h:outputText value="#{viewEventController.user.emailAddress}" />
			<h:outputText value="&nbsp;&nbsp;-&nbsp;&nbsp;" escape="false" />
			<h:commandLink action="#{homeController.home}">
				<f:param value="#{viewEventController.user.id}" name="userId" />
				<h:outputText value="Home" />
			</h:commandLink>
			<h:commandLink action="#{myEventsController.listMyEvents}">
				<f:param value="#{viewEventController.user.id}" name="userId" />
				<h:outputText value="My Events" />
			</h:commandLink>
			<h:commandLink action="#{manageAccountController.manageAccount}">
				<f:param value="#{viewEventController.user.id}" name="userId" />
				<h:outputText value="My Account" />
			</h:commandLink>
			<h:commandLink action="#{loginController.logout}">
				<h:outputText value="Log Out" />
			</h:commandLink>
		</h:panelGrid>
		<hr />
			<h:outputText value="<br/>" escape="false"/>
             
			 <h:outputText id="summary"/>
             	<h:message for="summary" style="color: Red" />
           	<h:outputText value="<br/>" escape="false"/>
             	
        <h2>
        
        <h:outputText value="Event Information - "/>
       
        </h2>
             
		<h:panelGrid columns="2">
			<h:outputText value="Event coordinator : " />
			<h:panelGroup>
				<h:outputText value="#{viewEventController.event.coordinator.lastName}" />
				<h:outputText value=", " />
				<h:outputText value="#{viewEventController.event.coordinator.firstName}" />
			</h:panelGroup>
			<h:outputText value="Event name: " />
		
			<h:outputText id="name" value="#{viewEventController.event.name}" />
			
			
			<h:outputText value="Event descripton: " />
		
			<h:outputText value="#{viewEventController.event.description}" />
		
			<h:outputText value="Start date: " />
	
			
			<h:outputText value="#{viewEventController.event.startDate}">
     			<f:convertDateTime type="date" pattern="MM/dd/yyyy"/>
  			</h:outputText>
				
			
			<h:outputText value="End date: " />
			
			<h:outputText id="endDate" value="#{viewEventController.event.endDate}">
     			<f:convertDateTime type="date" pattern="MM/dd/yyyy"/>
  			</h:outputText>
		
			
			<h:outputText value="Start time: " />
		
			<h:panelGroup>
				 <h:outputText value="#{viewEventController.event.startTime}">
     				<f:converter converterId="com.ochnas.volunteersignup.ui.TimeConverter"/>
  				</h:outputText>
  				<h:outputText value="#{viewEventController.currTimeZone}"/>
			</h:panelGroup>
			
		
			<h:outputText value="End time: " />
	
			<h:panelGroup>
				 <h:outputText id="endTime" value="#{viewEventController.event.endTime}">
     				<f:converter converterId="com.ochnas.volunteersignup.ui.TimeConverter"/>
  				</h:outputText>
  				<h:outputText value="#{viewEventController.currTimeZone}"/>
			</h:panelGroup>
		
		</h:panelGrid>
		
		<h:outputText value="<br/><br/>" escape="false" />

		<ul>
				
				<h2><h:outputText value="You've volunteered for:"></h:outputText>
				</h2>
					<h:panelGrid columns="2">
					<h:outputText value="Position name: "></h:outputText>	
					<h:outputText value="#{viewEventController.filledRequisition.position.name}"></h:outputText>	
					<h:outputText value="Description: "></h:outputText>	
					<h:outputText value="#{viewEventController.filledRequisition.position.description == null? 'None.': viewEventController.filledRequisition.position.description}"></h:outputText>	
					<h:outputText value="#{viewEventController.filledRequisition.timeSlot==null?'':'Time Slot:'}"/>	
					<h:panelGrid columns="3">
						<h:outputText value="#{viewEventController.filledRequisition.timeSlot==null?'':viewEventController.filledRequisition.timeSlot.startTime}">
							
						</h:outputText>
						<h:outputText value="#{viewEventController.filledRequisition.timeSlot==null?'':' to '}"></h:outputText>						
						<h:outputText value="#{viewEventController.filledRequisition.timeSlot==null?'':viewEventController.filledRequisition.timeSlot.endTime}">
							
						</h:outputText>
					</h:panelGrid>
					</h:panelGrid>
					</ul>
		</h:form>
	</body>
</f:view>
</html>